package com.ces.chain;


/*
 * @Author wuchengcheng
 * @Date 2019-10-13 15:05
 */
// 拦截器接口，所有代理对象需实现此接口
public interface Interceptor {
    // 此方法需由代理对象重写
Object intercept(final Invocation invocation) throws Throwable;

    default Object apply(final Object target) {
        return Chain.wrap(target, this);
    }
}
